-- @owner: @songjing20
-- @date: 2023-1-14
-- @testpoint: desc/describe分析delete语句
-- @modified by @zou_jialiang050 2024/4/30:根据最新代码优化用例

--step1:建表插入数据;expect:成功
drop table if exists t_describe_0070 cascade;
create table t_describe_0070 (id bigint primary key, wholesale decimal(6,2) not null default 0.00, retail decimal(6,2) not null default 0.00, quantity bigint not null default 0);
insert into t_describe_0070 values(112, 26.5, 28.5, 86), (2, 1.7, 5.0, 5164), (3, 4.1, 5.5, 63);

--step2:desc/describe查看delete执行计划;expect:打印执行计划
desc delete from t_describe_0070;
describe delete from t_describe_0070;

--step3:事务中desc/describe查看delete执行计划，提交/回滚;expect:执行成功
begin;/
desc analyze delete from t_describe_0070 where retail / wholesale >= 1.3 and quantity < 100;
select * from t_describe_0070;
rollback;
select * from t_describe_0070;

start transaction;
describe analyze delete from t_describe_0070 where retail / wholesale >= 1.3 and quantity < 100;
commit;
select * from t_describe_0070;

--step4:清理环境;expect:成功
drop table if exists t_describe_0070 cascade;